<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			function $$(id){
				return document.getElementById(id)
			}
			window.onload=function(){
				var cnv=$$("canvas")
				var cxt=cnv.getContext("2d")
				cxt.fillStyle='black'
        		cxt.fillRect(0,0,300,300)
				if(cxt.ellipse){
	            cxt.ellipse(150,100,75,50,0,0,Math.PI*2);
	            cxt.fillStyle="red";
	            cxt.fill();
	            cxt.stroke();
	        	}	
				cxt.beginPath();
		        var gnt = cxt.createLinearGradient(0,0,0,100);
		        gnt.addColorStop(0,"yellow");
		        gnt.addColorStop(0.2,"yellow");
		        gnt.addColorStop(0.7,"red");
		        gnt.addColorStop(1,"red")
		        cxt.fillStyle = gnt;
		        cxt.fillRect(100,20,100,45)
		        cxt.closePath();
				cxt.beginPath();
				
		        var gnt = cxt.createLinearGradient(0,180,0,100);
		        gnt.addColorStop(0,"yellow");
		        gnt.addColorStop(0.2,"yellow");
		        gnt.addColorStop(0.7,"red");
		        gnt.addColorStop(1,"red")
		        cxt.fillStyle = gnt;
		        cxt.fillRect(100,120,100,45)
		        cxt.closePath();
        		  var x=101
        		  var y=160
        		  var i=1
        		for(;i<22;i=i+1){
        			cxt.beginPath()
        			cxt.moveTo(x,y)
        			cxt.lineTo(x,y+50)
        			cxt.strokeStyle="yellow"
        			cxt.stroke()
        			x=x+5
        			cxt.closePath()
        		}
        		
			}
		</script>
	</head>
	<body>
		<canvas id="canvas"width="300"height="300" style="border:1px dashed gray;"></canvas>
		
	</body>
</html>
